import {graphql, parse} from "graphql";
import {GraphQLSchema, GraphQLObjectType, GraphQLString} from "graphql";

var stringify = function (obj) {
  return JSON.stringify(obj, null, 2);
};
var source = `
query { 
  a 
  t { ... Dog  }
  y { ... Dog  }
}

fragment Dog on Type {
  x
}
`;

//console.log(stringify(out));


var Source = require('graphql/language/source').Source;
var lex = require('graphql/language/lexer').lex;
var nextLex = lex(new Source(source))
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
console.log(nextLex());
